<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var n1 = prompt('请输入第一个要进行运算的数据：');
    var n2 = prompt('请输入第二个要进行运算的数字：');
    var result =(parseFloat(n1)+ parseFloat(n2)).toFixed(2);
    // var result = n1+n2
    console.log(result);
</script>
</html>